package pers.xukai.common.exception;


import lombok.Data;

/**
 * 业务异常类
 *
 * @author ch-xukai
 */
@Data
public class BizException extends RuntimeException {

    private static final long serialVersionUID = -8090252920997904926L;

    /**
     * 错误码
     */
    private String code;

    public BizException() {
    }

    public BizException(String msg) {
        super(msg);
    }

    public BizException(String msg, String code) {
        super(msg);
        this.code = code;
    }

    public BizException(String message, Throwable cause) {
        super(message, cause);
    }

    public BizException(Throwable cause) {
        super(cause);
    }

    public BizException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
}
